It is desirable to have an analytical instrument that possesses both sample preparation and sample analysis functions. It is also desirable to have an analytical instrument that is light and small and can be produced at a low cost. However, microfluidic challenges have impeded the development of such analytical devices. These challenges are due, in part, to the fluid dynamics at small scales. For example, as the diameter of a microfluidic channel decreases, the pressure drop across the channel increases by the 4th power, according to the Hagen-Poiseuille equation. When employing complex microfluidic geometries, these large pressure drops can result in flow patterns that are very difficult to predict, particularly with air bubbles in the system. The thermal expansion of air is more than five times greater than liquid, causing additional challenges.